package cn.mygweb.web.controller;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import cn.mygweb.common.pojo.JsonResult;
import cn.mygweb.web.pojo.Resource;

/** 
* <p>Title: ResourceController.java</p>
* <p>Description: 资源配置文件类</p>  
* @author gxb 
* @date 2019年5月19日 
* <p>Copyright: Copyright (c) 2019</p>
* <p>Company: www.mygweb.cn</p> 
*/
@RestController
@RequestMapping("/resource")
public class ResourceController {

	@Autowired
	private Resource resource;
	
	/**
	 * <p>Title: getResource</p>
	 * <p>Description: 获取资源配置文件中的属性值</p>
	 * @return
	 */
	@RequestMapping("/getResource")
	public JsonResult getResource() {
		Resource bean = new Resource();
		BeanUtils.copyProperties(resource, bean);
		return JsonResult.ok(bean);
	}
}
